package qiyu.live.gift.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import qiyu.live.gift.dto.GiftConfigDTO;
import qiyu.live.gift.interfaces.IGiftConfigRpc;
import qiyu.live.gift.provider.service.IGiftConfigService;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-10-23
 * Time: 20:28
 */
@DubboService
public class GiftConfigRpcImpl implements IGiftConfigRpc {

    @Resource
    private IGiftConfigService giftConfig;

    @Override
    public GiftConfigDTO getByGiftId(Integer giftId) {
        return giftConfig.getByGiftId(giftId);
    }

    @Override
    public List<GiftConfigDTO> queryGiftList() {
        return giftConfig.queryGiftList();
    }

    @Override
    public void insertOne(GiftConfigDTO giftConfigDTO) {
        giftConfig.insertOne(giftConfigDTO);
    }

    @Override
    public void updateOne(GiftConfigDTO giftConfigDTO) {
        giftConfig.updateOne(giftConfigDTO);
    }
}